package com.itheima04;

import java.util.TreeSet;

public class Test {
    public static void main(String[] args) {
        TreeSet<Student> s1=new TreeSet<>();
        s1.add(new Student("zhangsan",23));
        s1.add(new Student("liuwu",24));
        s1.add(new Student("zhangsan",23));
        s1.add(new Student("lisi",22));
        s1.add(new Student("zhaoqi",25));
        s1.forEach(s-> System.out.println(s));
    }
}
